Add MicrobotsLogAnalyzer custom ADO task support#141
Add MicrobotsLogAnalyzer custom ADO task support#141MadhurAggarwal wants to merge 1 commit intomicrosoft:mainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests.
Additional details and impacted files@@ Coverage Diff @@
## main #141 +/- ##
==========================================
- Coverage 64.38% 58.25% -6.13%
==========================================
Files 33 33
Lines 2333 2333
==========================================
- Hits 1502 1359 -143
- Misses 831 974 +143
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
| } | ||
|
|
||
| function runLogAnalyzer(python, inputs) { | ||
| const script = [ |
There was a problem hiding this comment.
I think its good to put this script in a .py file and run it from here, instead of passing them as strings
| const VENV_NAME = "microbots-log-analyzer-venv"; | ||
| const VENV_READY_MARKER = ".microbots-venv-ready-v1"; | ||
|
|
||
| function runCommand(command, args, env) { |
There was a problem hiding this comment.
Its good to add tests for this file
|
|
||
| function microbotsEnvironment(inputs) { | ||
| return Object.assign({}, process.env, { | ||
| OPEN_AI_DEPLOYMENT_NAME: inputs.deploymentName, |
There was a problem hiding this comment.
#140 refer to this PR for the env variables, you should remove the OPEN_AI_* variables from these
| OPEN_AI_API_VERSION: inputs.apiVersion, | ||
| AZURE_OPENAI_ENDPOINT: inputs.endpoint, | ||
| AZURE_OPENAI_API_VERSION: inputs.apiVersion, | ||
| AZURE_AUTH_METHOD: "azure_ad", |
There was a problem hiding this comment.
Since you are passing the token_provider explicitly later in code , you dont need to set this env var, this gets overridden by the token_provider
https://github.com/microsoft/microbots/blob/main/docs/authentication.md#option-b-pass-a-token-provider-programmatically
Adds a custom Azure DevOps task,
MicrobotsLogAnalyzer@0, for running MicrobotsLogAnalysisBotagainst log files using Azure OpenAI models, with authentication through an Azure Resource Manager Service Connection.Overview
MicrobotsLogAnalyzerTaskAzure Pipelines task.Change Details
.gitignore: Ignores generatednode_modulesfolders used while packaging the ADO task.README.md: Added a brief guide for the new MicrobotsLogAnalyzerTask.azure-pipelines/vss-extension.json: Defines the ADO extension that contributes the custom pipeline task. This file is needed for publishing the task.azure-pipelines/MicrobotsLogAnalyzerTask/task.json: Defines theMicrobotsLogAnalyzer@0task metadata, inputs, Node 20 handler, and task restrictions (restrictions ensure that LLM Outputs don't setup unwanted ENVs in ADO Pipeline, for example printing##vso[task.setvariableas part of Log RCA)azure-pipelines/MicrobotsLogAnalyzerTask/index.js: Implements Main Workflow: validates inputs, logs into Azure Service Connection, prepares Python venv, runsLogAnalysisBot, and prints the analysis.azure-pipelines/MicrobotsLogAnalyzerTask/package.json: Declares the Node dependencies required by the task.azure-pipelines/MicrobotsLogAnalyzerTask/package-lock.json: Locks task Node dependency versions for reproducible packaging.docs/azure-pipelines-log-analyzer.md: Documents prerequisites, packaging, publishing, usage, inputs, and task behavior.docs/examples/azure-pipelines/microbots-log-analyzer.yml: Provides a sample ADO YAML for usingMicrobotsLogAnalyzer@0.mkdocs.yml: Adds the new Azure Pipelines Log Analyzer guide to the docs navigation.